<?php

namespace App\Libs\Session;
class ScriptSession extends \App\Libs\Base\AccessObject
{

    public function getUser() {
        return new self(array('id' => 0, 'nickname' => 'sys'));
    }

    private static function generate($uid) {
        return  md5(md5($uid . ':' . mt_rand(1, 1000)) . microtime());
    }

    /**
     * for  login
     */
    public static function save($user) {
        
        return null;
    }

    /**
     * for user update
     */
    public static function resetCache($user) {
        
    }

    /**
     * for check login
     */
    public static function load() {
        return new self(array('id' => 0, 'nickname' => 'sys'));
    }

    /**
     * for logout
     */
    public static function destroy() {

    }
}
